% This MATLAB .m file replicates Figures A.1-A.5 in the Online Appendix of
% "Labor Market Conflict and the Decline of the Rust Belt" by Simeon Alder,
% David Lagakos, and Lee Ohanian.

% INSTRUCTIONS:
% 1. Create a folder on your computer and name it
% 'Replication'.
% 
% 2. Download the following MATLAB files from the Harvard
% Dataverse website and save them in the 'Replication' directory:
    % (a) plot_figure_A_1.m
    % (b) plot_figure_A_2.m
    % (c) plot_figure_A_3_and_A_5.m
    % (d) plot_figure_A_4.m

% 3. Download the following MATLAB workspaces froom the Harvard
% Dataverse website and save them in the 'Replication' directory:
    % (a) BM.mat
    % (b) CF_phiS_half_slow.mat

% 4. Download the following EXCEL spreadsheets from the Harvard
% Dataverse website and save them in the 'Replication' directory:
    % (a) inv_shares.xlsx
    % (b) time_series_shares.xlsx
    % (c) emp_share_mfg.xlsx
		
% 3. Set your computer's path (working directory) to the 'Replication'
% directory (update line 38 of this m-file).
		
% 4. This .m file generates Figures A.1-A.5 in the online appendix in both
% PDF and EPS file formats.

% NOTE: Running this .m file will generate warnings about missing function
% handles. These function handles are not needed to re-produce the figures
% in the manuscript and the user can safely ignore the warnings.

% Set path (working directory):
cd('/Users/simeonalder/Dropbox/Work/Research/Rust Belt Project/Rust Belt/Manuscript JPE Revision/JPE/Replication')

% Replicates Figures A.1-A.5 in the online appendix of "Labor Market
% Conflict and the Decline of the Rust Belt".

% Figure A.1: Firm Investment-to-Value Added Ratio
plot_figure_A_1

% Figure A.2: Labor Conflict over Time
plot_figure_A_2

% Figure A.4: Employment Share of Rust Belt
plot_figure_A_4

% Figure A.3: Counterfactual Path of phi_S
% and
% Figure A.5: Labor's Share of Income in Manufacturing
plot_figure_A_3_and_A_5